package com.hehe.resource;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@SpringBootApplication
@EnableAutoConfiguration
@EnableWebMvc
@RestController
public class HeheResourceExampleApplication {

	public static void main(String[] args) {
		SpringApplication.run(HeheResourceExampleApplication.class, args);
	}
	
	@GetMapping("/resource/protectedApi")
	public String protectedApi() {
		return "test1";
	}
	
	@GetMapping("/resource/unprotectedApi")
	public String test() {
		return "test2";
	}

}
